package com.nulgame.bukkit.plugin.messagebuilder;

import com.nulgame.bukkit.plugin.responsebuilder.AntiChatSpamResponseBuilder;

import junit.framework.TestCase;

public class AntiChatSpamResponseBuilderTestCase extends TestCase {
	public void testToResponse(){
		AntiChatSpamResponseBuilder builder = new AntiChatSpamResponseBuilder("%PlayerName%, do not send the same %AllowedInfraction% message(s) in %InMillisTime%s", "chicanh", "What's up!", 3, 10L);
		assertEquals("chicanh, do not send the same 3 message(s) in 10s", builder.toResponse());
		
		builder = new AntiChatSpamResponseBuilder(null, "chicanh", "What's up!", 3, 10L);
		assertNull(builder.toResponse());
	}
}
